<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Promise</title>
</head>
<body>
  <script src="./v1.0_promise.js"></script>
  <script>
    // var p = new myPromise(function(resolve, reject) {resolve(1)})
    // p.then(x => console.log(x));
    var p = new myPromise(function(resolve,reject){setTimeout(function(){resolve(1)},1000)});
    p.then(function(x){console.log(x)})
  </script>
</body>
</html>